<!DOCTYPE html>
<html lang="en"xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 新 Bootstrap5 核心 CSS 文件 -->
    <link rel="stylesheet" href="../static/css/bootstrap.min.css">
    <!--  popper.min.js 用于弹窗、提示、下拉菜单 -->
    <script src="https://cdn.staticfile.org/popper.js/2.9.3/umd/popper.min.js"></script>
    <!-- 最新的 Bootstrap5 核心 JavaScript 文件 -->
    <script src="../static/js/bootstrap.min.js"></script>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<a class="nav-link" th:href="@{/}">返回首页</a>

<form th:action="@{'/back/article/publish/'+${article==null?'':article.getId()}}" method="post">
    <label for="title" class="form-label">标题</label>
    <input type="text" class="form-control" id="title" name="title" required th:value="${article==null?'':article.getTitle()}">

    <label for="category" class="form-label">分类</label>
    <input type="text" class="form-control" id="category" name="category" required th:value="${article==null?'':article.getCategory()}">

    <label for="comment" class="form-label">内容</label>
    <textarea class="form-control" rows="5" id="comment" name="content" required th:text="${article==null?'':article.getContent()}"></textarea>
    <button type="submit" class="btn btn-primary">发布</button>
</form>
</body>
</html>